Ext.namespace('com.gmcc.bi.adhoc');
Ext.namespace('com.gmcc.bi');
Ext.namespace("com.gmcc.bi.adhoc.sql");
Ext.namespace("com.gmcc.bi.adhoc.sqlenginer");
Ext.namespace('com.gmcc.bi.analyze');
Ext.namespace("sqlbuilder");
var biAdhocNs = com.gmcc.bi.adhoc;
var biAnaly = com.gmcc.bi.analyze;
var biNs = com.gmcc.bi;
var wlocation = window.location;
var path = wlocation.pathname.substring(1);
biAdhocNs.sysUrl = [wlocation.protocol, '//', wlocation.hostname, (wlocation.port == '' ? '': ':'), wlocation.port, 
              '/',path.substring(0,path.indexOf('/')+1)].join('');

//2011-08 huangkenglong 珠海标签管理首页需求 增加取地市标识
biAdhocNs.city = path.substring(0,path.indexOf('/'));
//
              
//=========================
//biAdhocNs.postUrl = '/gz/servlet/frame.Grazioso.Application.Config.App.Servlet1';
// Ext.BLANK_IMAGE_URL = '../ext/resources/images/default/s.gif';
Ext.QuickTips.init();

String.prototype.replaceAll = function stringReplaceAll(AFindText, ARepText) { // 构造替换函数
	var raRegExp = new RegExp(AFindText, "g");
	return this.replace(raRegExp, ARepText);
};

// 定义一些常量
biAdhocNs.ROOT = -1; // 根节点特别编码为-1
biAdhocNs.TABLE_CODE = -99; // 表的类别ID为-99
biAdhocNs.PART_TYPE = -99; // 分类的是否分表类型为-99
biAdhocNs.COLTYPE_DEMENSION = 1; // 字段类型为维度
biAdhocNs.COLTYPE_CODE = 3; // 字段类型为编码
biAdhocNs.COLTYPE_NO_TABLE_DEMENSION = 4; // 字段类型为没有维表的维度
biAdhocNs.COLTYPE_INTRVAL = 5; // 字段类型为日期
biAdhocNs.COLTYPE_STAT_MON = 6; // 字段类型为查询月份
biAdhocNs.COLTYPE_STAT_CIT = 7; // 字段类型为查询地市
biAdhocNs.IS_PRIMARY_KEY = 1; // 是主键
biAdhocNs.NOT_IS_PRIMARY_KEY = 0; // 不是主键